/*
 * Copyright (c) 2025 CAX Conversion Project
 */
package com.comac.ins.isfd.domain.bo;

import com.comac.ins.common.core.validate.AddGroup;
import com.comac.ins.common.core.validate.EditGroup;
import com.comac.ins.common.mybatis.core.domain.BaseEntity;
import com.comac.ins.isfd.domain.IsfdDatasourceTaskSchedulingConfig;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 数据源数据集成任务调度配置业务对象 isfd_datasource_task_scheduling_config
 *
 * @author Lion Li
 * @date 2024-10-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = IsfdDatasourceTaskSchedulingConfig.class, reverseConvertGenerate = false)
public class IsfdDatasourceTaskSchedulingConfigBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 任务ID
     */
    @NotNull(message = "任务ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long taskId;

    /**
     * 调度类型（0-周期性任务，1-外部触发任务）
     */
    @NotNull(message = "调度类型（0-周期性任务，1-外部触发任务）不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer schedulingType;

    /**
     * 调度周期
     */
    @NotNull(message = "调度周期不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long schedulingCycle;

    /**
     * 周期单位（hour-时，day-天）
     */
    @NotBlank(message = "周期单位（hour-时，day-天）不能为空", groups = {AddGroup.class, EditGroup.class})
    private String cycleUnit;

    /**
     * 调度开始时间
     */
    @NotNull(message = "调度开始时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date startTime;

    /**
     * 调度结束时间
     */
    @NotNull(message = "调度结束时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date endTime;

    /**
     * 生效开始时间
     */
    @NotNull(message = "生效开始时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date effectiveStartTime;

    /**
     * 生效结束时间
     */
    @NotNull(message = "生效结束时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date effectiveEndTime;

    /**
     * 最近的一次触发时间
     */
    @NotNull(message = "最近的一次触发时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date triggerTime;

    /**
     * 是否执行中（0-未执行，1-执行中）
     */
    @NotNull(message = "是否执行中（0-未执行，1-执行中，2-中止）不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer status;

    /**
     * 是否删除，0-未删除，1-已删除
     */
    @NotNull(message = "是否删除，0-未删除，1-已删除不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer isDeleted;


}
